<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>动态改变style属性值</title>
  <script type="text/javascript" src="vue.js"></script>
  <style>
    div>div {
      width: 60px;
      height: 60px;
      border: 2px solid #bbb;
      text-align: center;
      line-height: 60px;
      font-size: 30px;
      margin:10px;
      float:left;
    }
  </style>    
</head>
<body>
  <div id="app">
    <div v-bind:style="{ borderColor: selected1 ? '#000' : '#bbb' }">1</div>
    <div v-bind:style="{ borderColor: selected2 ? '#000' : '#bbb' }">2</div>
  </div>
  <script>
    var vm = new Vue({
      el: '#app',
      data:{
        selected1: false,
        selected2: true
      },
    })
  </script>
</body>
</html>